#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int a[MAXN];
multiset<int> s;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n,ans = 0;
    scanf("%d",&n);
    for(int i = 0 ; i < n ; ++i){
        int x;
        scanf("%d",&x);
        s.insert(x);
    }
    int id = 0;
    for(auto& i : s){
        a[id++] = i;
    }
    for(int i = 1, j = 0; j < n; ++i,++j){
        while(i < n && a[i]==a[j])++i;
        if(i==n)break;
        ans++;
    }
    printf("%d\n",n-ans);
	return 0;
}
